<style lang='scss' type='stylesheet/scss' scoped>
.as-input {
  margin-bottom: 10px;
}
</style>
<template>
  <div>
    <as-h2>按钮组</as-h2>
    <as-card :text="text"
            title="设置按钮组后，只需要绑定一个 v-model">
      <as-radio-group v-model="favourite">
        <as-radio label="fruit">水果</as-radio>
        <as-radio label="vegetable">蔬菜</as-radio>
        <as-radio label="sports">运动</as-radio>
      </as-radio-group>
    </as-card>
  </div>
</template>

<script type="text/ecmascript-6">
import { mapGetters } from "vuex";
export default {
  name: "",
  computed: {
    ...mapGetters(["isMobile"])
  },
  data() {
    return {
      favourite: "fruit",
      text: `<template>
   <as-radio-group v-model="favourite">
     <as-radio label="fruit">水果</as-radio>
     <as-radio label="vegetable">蔬菜</as-radio>
     <as-radio label="sports">运动</as-radio>
   </as-radio-group>
 </template>
 <script>
 export default {
   data(){
     return {
       favourite: "fruit"
     }
   }
 }
 <\/script>`
    };
  },
  methods: {}
};
</script>
